import http from "@/http/index"
import qs from "qs"

// 商品详情
export const ApiProducts = (id: string): RES<IGetData<IDetailsData>> => http.get(`/products/${id}`)

// 加入到购物车
export const ApiCartAdd = (params: { productId: number | string, total: string | number }): RES<IGetData<any>> => http.post('/shop/carts/add', qs.stringify(params))